home *** CD-ROM | disk | FTP | other *** search
- DEFF4.TXT
- ---------
-
- I have given, below, a description of each of the functions
- which I have written for the file -
-
- DEFF4.C
-
- and which may be accessed through -
-
- DEFF4(.CRL)
-
- when you use the CLINK function with BDS C. It is
- necessary to specify "DEFF4" on the command line when using
- the included functions. If you put it first, say -
-
- clink filename deff4 {other options} <RETURN>
-
- then you will always get the DEFF4 functions included in the
- COM file in preference to any other functions of the same name
- which might be elsewhere in your files.
-
- If you intend to use DEFF4 in this way then it should be on
- the same disk as the BDS C DEFF files. Now, the functions
- I have written and what they do are -
-
-
- ENTAB(n)
- int n;
- ------
-
- This can only be used when the position "n" along the line
- (generally of up to 80 characters and ALWAYS terminated with
- the RETURN character) is known. So you have to maintain
- (external to this function) a count of where you are along
- the line, and pass this value to TAB.
-
- TAB will then expand any "tab" characters ( = 0x09) into the
- correct number of spaces, so long as you are using a tab
- which is set to 8 spaces. If you want to change this to any
- other tab spacing, then go into DEFF4 and change the equate.
-
- Note particularly this was written for use with printers
- which don't recognise the tab character. I believe a lot
- of the older printers are of this type.
-
- LISTD(i)
- int i;
- --------
-
- Will print an integer as a decimal number on the list device
- which is typically the line printer.
-
-
- LISTS(str)
- char *str;
- ----------
-
- Will list a null-terminated string on the list device which is
- typically the line printer.
-
-
- LOWER_STR(str)
- char *str;
- --------------
-
- Will convert a null-terminated string, in place, to lower
- case characters.
-
-
- MAKE_FCB(name, fcb)
- char name[15], fcb[36];
- ------------------------
-
- Will create a CP/M file control block with the file name
- correctly parsed for use with other functions such as
- OPEN_FILE, CREATE_FILE, etc which are to be found in DEFF3.
-
- Note: I didn't do anything to set the drive code (which is
- ---- character fcb[0], so this will be zero unless you
- specifically set it to something after using the
- "make_fcb" function. It is easy enough to include
- the drive specifier in the function, if you wish to
- do this yourself as an exercise.
-
-
- PEC_CLEAR()
- -----------
-
- Clears the terminal screen without having to know the special
- terminal functions. Note does NOT home the cursor.
-
-
- SET_BIT(fcb, mode)
- char fcb[36], mode[3];
- ---------------------
-
- This is the function used in BACKUP to change the attribute
- bits in the name given in the file control block. Mode has
- to be one of -
-
- R/O Read Only
- R/W Read/Write
- DIR Appears in directory when listed
- SYS Doesn't appear in directory
- ARC Has already been archived by BACKUP
- CPY Not yet archived
-
-
- UP-STR(str)
- char *str;
- -----------
-
- Will convert a null-terminated string to upper case ASCII
- characters, in place.
- ce
- which is typically the line printer.
-
-
- LISTS(str)
- char *str;
- ----------